#include<iostream>
#include<vector>
using namespace std;

class Solution {
public:
	vector<int> twoSum(vector<int>& numbers, int target) {
		auto iter = numbers.begin();
		auto ite = --numbers.end();
		vector<int> a;
		int m = 1, n = numbers.size();
		while (iter!=ite)
		{
			if (*iter + *ite > target)
			{
				ite--;
				n--;
			}
			else if (*iter + *ite < target)
			{
				iter++;
				m++;
			}
			else 
			{
				a.insert(a.end(), m);
				a.insert(a.end(), n);
				break;
			}
		}
		return a;
	}
};
//int main()
//{
//	Solution *s = new Solution;
//	//cout << 
//	vector<int> a = {5,25,75};
//	s->twoSum(a,100);
//	return 0;
//}